<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="utf-8" />
		<link rel="stylesheet" type="text/css" href="css/global.css"/>
		<link rel="stylesheet" type="text/css" href="css/index.css"/>
		<title>学生管理系统登录</title>
		<script type="text/javascript">
			function check() {
				var user = document.getElementById("username");
				var pass = document.getElementById("password");
				if(user.value==""||pass.value==""){
					alert("请输入用户名或者密码");
					if(user.value==""){
						user.focus();
						return false;
					}else if(pass.value==""){
						pass.focus();
						return false;
					}
				}else{
					return true;
				}
				
			}
		
		</script>
	</head>
	<body>
			<div class="content">
				<div class="login">
					<div style="text-align: center;padding-top: 28px;">
						<h2>学生信息管理系统</h2>
						<span style="color: red;text-align: center"> ${message }</span>
				 	<%
						
							//if(request.getAttribute("message")==null){
							//	out.print("");
							//}else{
							//	out.print(request.getAttribute("message").toString());
							//}
							//if(request.getAttribute("message").toString()==null||request.getAttribute("username").toString().equals("")){
							//	out.print(request.getAttribute("message"));
							//}else{
							//	out.print("");
							//}
						
						%>
						
						
					</div>
					<form action="dologin.jsp" method="post" onsubmit="return check()">
						<div class="warp">
							<span>用户名：</span><input id="username" class="input" name="username" type="text" value=""/>
						</div>
						<div class="warp">
							<span>密&nbsp;&nbsp;&nbsp;&nbsp;码：</span><input id="password" name="password" class="input" type="password" value=""/>
						</div>
						<div class="warp">
							<input class="sub" type="submit" value="登录"/>
						</div>
					</form>
				</div>
			</div>
	</body>
</html>
